package com.wing.cabinet.service;

import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.wing.cabinet.model.entity.Cabinet;
import com.wing.cabinet.model.request.CabinetForm;
import com.wing.cabinet.model.response.CabinetVO;
import com.wing.common.utils.JsonResult;

import java.util.List;
import java.util.Map;

/**
 * 刀柜-Service
 *
 * @author
 */
public interface CabinetService extends IService<Cabinet> {

    /**
     * 添加
     *
     * @param cabinetForm
     * @return
     */
    int add(CabinetForm cabinetForm);

    /**
     * 列表-app
     *
     * @param params
     *
     * @return
     */
    List<CabinetVO> list4app(Map<String, Object> params);

    /**
     * 库存列表-app
     *
     * @param params
     *
     * @return
     */
    Page<CabinetVO> inventory(Page page,Map<String, Object> params);

    /**
     * 我的库存 -app
     *cabinetNature  主柜传mian  辅柜传sale
     */
    CabinetVO myInventory(String cabCode,String cabinetNature);


    /**
     * 分页list-app
     *
     * @param page
     * @param params
     *
     * @return
     */
    Page<CabinetVO> pageList4app(Page page, Map<String, Object> params);

    Page<CabinetVO> pageList4Cab(Page page, Map<String, Object> params);

    /**
     * 详情-app
     *
     * @param id
     *
     * @return
     */
    CabinetVO get4appById(Long id);

    CabinetVO get4appByCode(String code);

    CabinetVO getMainCab4appByCode(String code);

    Cabinet getMainCab4appByMainCabCode(String code);

    JsonResult<CabinetVO> isExistAndUpdate(String code,String cabName);

    int updateCompany(Map<String, Object> params);

    Cabinet getCabinetVOByCabCode(String cabCode);

    List<CabinetVO> getCabinetByCabinetNature();

    List<CabinetVO> getCabs();
}
